<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{$page_title}</title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.css" />
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/template/default/css/webapp.css" />
  <script type="text/javascript" src="__PUBLIC__/template/default/js/jquery.min.js"></script>
  <script type="text/javascript" src="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.js"></script>
  
  <style>
      body{
          background-color:  #fefefe;
      }
      .blend-panel{background-color: #fafcfb;}
      .blend-picture-full img{
          margin: 0;
      }
      .top_create_bg{
          background-image: url("__PUBLIC__/template/default/img/vote/index_top_bg.jpg");
          height: 8rem;
          width: 100%;
          background-size:contain;
      }
      .top_create_bg [class*=blend-col-]{
          background-color:#ffea01;
          border: none;
      }
      
      .top_create_bg [class*=blend-col-4]{
          background-color:#ffea01;
          border: none;
          color: #f9493c;
          text-align: center;
          font-size: 1.6rem;
      }
      
      .bottom_create_bg{
          background-color: #fefefe;
      }
      
      .bottom_create_bg [class*=blend-col-]{
          background-color: #fefefe;
          border: none;
      }
      
      
      
      
      .create_vote_option [class*=blend-col-4]{
          background-color:#fefefe;
          border: none;
          color: #404040;
          text-align: center;
          font-size: 2rem;
      }
      
      .create_vote_option [class*=blend-col-8]{
          background-color:#fefefe;
          border: none;
          color: #404040;
          text-align: left;
          font-size: 1.6rem;
      }
      
      
      .create_option_btn,.create_option_btn:focus,.create_option_btn:hover{
          background-color: #FFBE3C;
          border-radius: 10px;
          border: none;
          /*box-shadow: 1px 3px 2px 1px #A30001;*/
      }
      
      .blend-suggest-input-gray .blend-suggest-ico{
          background-color: #ff756B;
      }
      .blend-suggest-input-gray input{
          background-color: #fafcfb;
      }
      .blend-suggest-input-gray{
          border-color: #ff756B;
          border-radius:5px;
      }
      .btn_show,.btn_show:focus,.btn_show:active,.btn_show:hover
      {
          background-color: #ff756b;
          border: none;
          color: #fff;
      }
      
      .btn_show_foucus,.btn_show_foucus:focus,btn_show_foucus:active,.btn_show_foucus:hover
      {
          background-color: #f9493c;
      }
      .blend-dialog{
          width: 280px;
          top:40%;
      }
      
      #cover{display:none;position:absolute;left:0;top:0;z-index:18888;background-color:#000000;opacity:0.7;}

      #guide{display:none;position:absolute;right:18px;top:5px;z-index:19999;}

      #guide img{width:100%;height:100%;}
      .blend-header-item{
        position: absolute;
        /*top:1%;*/
        /*left:1%;*/
        z-index: 10;
      }

  </style>
</head>

<body>
<div class="blend-dialog-mask" style="opacity: 0.5; height: 2529px; display:none;"></div>
    <a class="blend-header-item  blend-button" href="{:U('xws_rank',array('id'=>$list[0][id]))}"><img src="__PUBLIC__/template/default/img/acshenzhen/goback.png" style="height:28px;"/></a>  
    <!--头部图片-->
    <figure class="blend-picture blend-picture-full ">
       <img src="__PUBLIC__/template/default/img/acshenzhen/banner.jpg"> 
    </figure>
    
    <div style="height:15px;"></div>
    
    
    <div class="blend-panel" style="width:90%; background-color:#8CDFFF; margin: auto; border: none;">
        <div class="blend-panel-header blend-panel-left" style=" border: none; color: #fff;">
            <span style="font-size:1.6rem">{$list.0.vote_name}</span>    {$list.0.id}号 <span style=" float: right;">共计<span id="vote_count">{$list.0.vote_num}</span>票</span>
            <div>我的宣言:{$list.0.slogan}</div>
            
        </div>
        <div class="blend-panel-body" style=" border: none;color: #fff;font-size: 1.8rem;">
            <div class="blend-panel-center" style="margin-top:14%;">
                <img src="{$list.0.thumb}" style=" width: 25.5rem;"/>
            </div>
            <br/>
        </div>
        
    </div>
    
   <!--提交参赛作品-->
    
   
   <div class="blend-grid blend-container-fluid bottom_create_bg" style="margin-top:8%;">
       
       <!--判断是不是自己-->
       <if condition="$mid eq $list[0]['mid']">
           
           <else/>
           <div class="blend-row">
                <span class="blend-col-2"></span>
                <span class="blend-col-8">
                    <button class="blend-button blend-button-primary blend-button-large create_option_btn" id="vote_it">投Ta一票</button>
                </span>
                <span class="blend-col-2"></span>
            </div>
            <br/>
       </if>
       
       <div class="blend-row">
           <span class="blend-col-2"></span>
           <span class="blend-col-8">
               <button id="create_option_chk" class="blend-button blend-button-primary blend-button-large create_option_btn">分享</button>
           </span>
           <span class="blend-col-2"></span>
       </div>
       <br/>
       <div class="blend-row">
           <span class="blend-col-2"></span>
           <span class="blend-col-8">
               <a href="{:U('xws_rank',array('id'=>$list[0][id]))}" class="blend-button blend-button-primary blend-button-large create_option_btn">查看更多</a>
           </span>
           <span class="blend-col-2"></span>
       </div>
   </div>
   
    <div id="customDialog" class="blend-dialog" style="background-color: #FE746A;">
        
    </div>


  <div class="blend-row guanzhu" style="position:fixed; top:15%; z-index:100; display:none;">
    <img src="__PUBLIC__/template/default/img/acshenzhen/erweima.png" style="width:90%; margin-left:5%;">
    <div style="float: left;margin-left:30%;margin-top:-58%;position: absolute;"><img src="{$list.0.qrcode_url}" style="width:14.5rem; height:14.5rem;"></div>
  </div>
  <div class="blend-row blend-panel-center fenxiang_img1" style="position:fixed; top:15%; z-index:100; display:none;">
    <img src="__PUBLIC__/template/default/img/acshenzhen/vote_again.png" style="width:90%; margin-left:5%;">
    <div id="close_fenxiang_1" style="float:left; width:30px; height:30px; margin-left:48%; margin-top:-7%;     position: absolute;"></div>
  </div>
  <div class="blend-row blend-panel-center fenxiang_img2" style="position:fixed; top:15%; z-index:100; display:none;">
    <img src="__PUBLIC__/template/default/img/acshenzhen/vote_success.png" style="width:90%; margin-left:5%;">
    <div id="close_fenxiang_2" style="float:left; width:30px; height:30px; margin-left:48%; margin-top:-7%;     position: absolute;"></div>
  </div>
  <div class="blend-row blend-panel-center fenxiang_img3" style="position:fixed; top:15%; z-index:100; display:none;">
    <img src="__PUBLIC__/template/default/img/acshenzhen/shar_img.png" style="width:90%; margin-left:5%;">
    <div id="close_fenxiang_3" style="float:left; width:30px; height:30px; margin-left:48%; margin-top:-7%;     position: absolute;"></div>
  </div>
   
      <div style="height:50px;"></div>
<!--   <div class="footer_nav">
    <nav data-blend-widget="tabnav" class="blend-tabnav" style="margin-bottom: 0px; bottom: 0px; position: absolute; width: 100%; height: 50px; ">
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('xws_rank')}" style="height:50px;">
            <img src="{$resource_basic}/img/acshenzhen/school_tab_1_unsel.png" style=" height: 50%;margin-top: 5px;"/>
                <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px;font-size: 12px; color: #777">
                     排名
                </span>
        </a>
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('xws_vote_create')}" style="height:50px;">
                     <img src="{$resource_basic}/img/acshenzhen/school_tab_2_sel.png" style=" height: 50%;margin-top: 5px;"/>
                    <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px;font-size: 12px; color: #f47a6b;">
                     报名
                </span>
        </a>
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('xws_instruction')}" style="height:50px;">
                     <img src="{$resource_basic}/img/acshenzhen/school_tab_3_unsel.png" style=" height: 50%;margin-top: 5px;"/>
                     <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px; font-size: 12px; color: #777;">
                     活动说明
                </span>
        </a>


     </nav>
</div>-->
   


<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
wx.config({
    debug: false,
    appId: '{$signPackage["appId"]}',
    timestamp: {$signPackage["timestamp"]},
    nonceStr: '{$signPackage["nonceStr"]}',
    signature: '{$signPackage["signature"]}',
    jsApiList: [
      // 所有要调用的 API 都要加到这个列表中
      'onMenuShareTimeline',
      'onMenuShareAppMessage'
    ]
});


wx.ready(function () {
// 在这里调用 API
    wx.onMenuShareTimeline({
        title: '我是深圳“食品安全小卫士”，点我支持我', // 分享标题
        link: "{$site_url}{:U('M/Acshenzhen/xws_vote_detail')}"+"?id="+{$list.0.id}, // 分享链接
        imgUrl: 'http://www.zhongcetianxia.com/Public/template/default/img/acshenzhen/share_icon.jpg', // 分享图标
        success: function () { 
            // 用户确认分享后执行的回调函数，生成红包
            // _system.$("cover").click()

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });
    
    wx.onMenuShareAppMessage({
        title: '我要争当“食品安全小卫士” 我是{$list.0.vote_name}，投我一票吧', // 分享标题
        desc: '众测天下召集食品安全小卫士啦，一起参与领奖品', // 分享描述
        link: "{$site_url}{:U('M/Acshenzhen/xws_vote_detail')}"+"?id="+{$list.0.id}, // 分享链接
        imgUrl: 'http://www.zhongcetianxia.com/Public/template/default/img/acshenzhen/share_icon.jpg', // 分享图标
        type: '', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () { 
            // 用户确认分享后执行的回调函数
            // _system.$("cover").click()

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });

});
</script>
<script type="text/javascript">
  $(document).ready(function(){
      $("#vote_it").bind('click',function(){
          
//          alert("活动停止，谢谢参与!");
//          return;
        var now_url = window.location.href;
        var url = "{:U('M/Acshenzhen/xws_vote_it')}";
        var id = {$list.0.id};
        $.ajax({
          type:'post',
          url:url,
          data:{id:id},
          dataType:'json',
          success:function(json){
            // alert(json); return;
            if(json===1){
              $(".fenxiang_img2").show();
              $(".blend-dialog-mask").show();
              var vote_count = parseInt($("#vote_count").text())+1;
              $("#vote_count").text(vote_count);
            }else if(json===2){
              $(".fenxiang_img1").show();
              $(".blend-dialog-mask").show();
            }else if(json===3){
              $(".guanzhu").show();
              $(".blend-dialog-mask").show();
            }
          }
        });
      });
      $("#close_fenxiang_1").bind('click',function(){
          // $(".blend-dialog-mask").show();
          $(".fenxiang_img1").hide();
          $(".blend-dialog-mask").hide();
      });
      $("#close_fenxiang_2").bind('click',function(){
          // $(".blend-dialog-mask").show();
          $(".fenxiang_img2").hide();
          $(".blend-dialog-mask").hide();
      });
      $("#create_option_chk").bind('click',function(){
          $(".fenxiang_img3").show();
          $(".blend-dialog-mask").show();
      });
      $("#close_fenxiang_3").bind('click',function(){
          // $(".blend-dialog-mask").show();
          $(".fenxiang_img3").hide();
          $(".blend-dialog-mask").hide();
      });       
});
</script>
<?php require_once 'cs.php';echo '<img src="'._cnzzTrackPageView(1256622573).'" width="0" height="0"/>';?>
<include file="Index/foot_analyze"/>
</body>
</html>